package com.example.utils;

import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class ResultUtils {
    private int code;
    private String message;
    private Object data;

    public static ResultUtils Successful(String message,Object data){
        ResultUtils resultUtils=new ResultUtils();
        resultUtils.code=200;
        resultUtils.message=message;
        resultUtils.data=data;
        return resultUtils;
    }

    public static ResultUtils Failure(String message,Object data){
        ResultUtils resultUtils=new ResultUtils();
        resultUtils.code=500;
        resultUtils.message=message;
        resultUtils.data=data;
        return resultUtils;
    }
}
